import request from './http.js'
//获取登录请求
export const reqlogin=(data)=>request({url:`/auth/loginByWeb`,data,method:'post'});
//获取首页数据
export const reqHomepageList=()=>request({url:'/index/index',method:'get'})
//搜索窗口数据
export const reqSearchWindowList=()=>request({url:'/search/index',method:'get'})
//实时搜索功能接口
export const reqRealtimeList=(params)=>request.get('/search/helper',{params})
//清除历史记录
export const reqClearhistoryList=()=>request({url:'/search/clearhistory',method:'post'})
//搜索框商品搜索
export const reqpRoductsearchList=(params)=>request.get('/goods/list',{params})
//品牌详情
 export const reqBranddetailsList=(id)=>request({url:`/goods/detail/?id=${id}`,method:'get'})
 //相关产品
 export const reqRelatedproductsList=(id)=>request({url:`/goods/related/?id=${id}`,method:'get'})
 // 专题请求
export const reqGetTopicList = ({page, size}) => request ({url: '/topic/list', method: 'get', params: {page, size}})
//全部分类数据接口
export const reqAllclassificationList=()=>request({url:'/catalog/index',method:'get'})
//获取当前分类数据
export const reqCurrentclassificationList=(id)=>request({url:`/catalog/current/?id=${id}`,method:'get'})
//获取购物车产品数量
export const reqProductquantityList=()=>request({url:'/cart/goodscount',method:'get'})
//加入购物车
export const reqAddtocartList=({goodsId,productId,number})=>request({url:'/cart/add',method:'post',data:{goodsId,productId,number}})
//获取购物车数据（含完成编辑）
export const reqShoppingcartList=()=>request({url:'/cart/index',method:'get'})
//商品步进器
export const reqCommoditystepperList=({goodsId,id,number,productId})=>request({url:'/cart/update',data:{goodsId,id,number,productId},method:'post'})
//删除商品
export const reqDeletecommodityList=(productIds)=>request({url:'/cart/delete',data:{productIds},method:'post'})
//点击切换商品选中状态（含全选）
export const reqSelectedstateList=({isChecked,productIds})=>request({url:'/cart/checked',method:'post',data:{isChecked,productIds}})